package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by chengang on 2017/6/7.
 */

public class ResultsEndorsementApi extends BaseApi {
    ResultsEndorsementReq req;
    public ResultsEndorsementApi(String page_num,String link_mobile) {
        req = new ResultsEndorsementReq(page_num,link_mobile);
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).threesale(requestBody);
    }

    class ResultsEndorsementReq {
        public String link_mobile;
        public String page_num;

        public ResultsEndorsementReq(String page_num,String link_mobile){
            this.link_mobile = link_mobile;
            this.page_num = page_num;
        }
    }
}
